package fina2.dcs.system;

import java.io.Serializable;
import java.math.BigDecimal;

import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.Table;

@Entity
@Table(name = "SYS_USER_BANKS")
@SuppressWarnings("serial")
public class SysUserBank implements Serializable {

	private BigDecimal canAmend;
	private SysUserBankPk userBankPk;

	public SysUserBank() {

	}

	public SysUserBank(SysUserBankPk userBankPk) {
		this.userBankPk = userBankPk;
	}

	@EmbeddedId
	public SysUserBankPk getUserBankPk() {
		return userBankPk;
	}

	public void setUserBankPk(SysUserBankPk userBankPk) {
		this.userBankPk = userBankPk;
	}

	@Column(name = "CANAMEND")
	public BigDecimal getCanAmend() {
		return canAmend;
	}

	public void setCanAmend(BigDecimal canAmend) {
		this.canAmend = canAmend;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((userBankPk == null) ? 0 : userBankPk.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		SysUserBank other = (SysUserBank) obj;
		if (userBankPk == null) {
			if (other.userBankPk != null)
				return false;
		} else if (!userBankPk.equals(other.userBankPk))
			return false;
		return true;
	}

}